package com.fpx.open.platform.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 客户实体类，关联到速递客户
 * @author sunkey
 * @date Apr 2, 2013 9:42:20 AM
 * @version 1.0.0 
 * @copyright fpx.com
 */
public class Customer extends ParentDomain implements Serializable {
	
	public static final String TYPE_OMS = "OMS";
	
	public static final String TYPE_XMS = "XMS";
	/**
	 * 客户 ID
	 */
    private Integer customerId;
    /**
     * 客户名称
     */
    private String name;
    /**
     * 客户公司编码
     */
    private String comapnyCode;

    /**
     * 客户公司id
     */
    private Integer comapnyId;
    /**
     * 创建时间
     */
    private Date dateCreated;
    /**
     * 备注
     */
    private String remark;
    
    private String type;


    private Date dateUpdated;


    private static final long serialVersionUID = 1L;

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getComapnyCode() {
        return comapnyCode;
    }

    public void setComapnyCode(String comapnyCode) {
        this.comapnyCode = comapnyCode == null ? null : comapnyCode.trim();
    }

    public Integer getComapnyId() {
        return comapnyId;
    }

    public void setComapnyId(Integer comapnyId) {
        this.comapnyId = comapnyId;
    }

    public Date getDateUpdated() {
        return dateUpdated;
    }

    public void setDateUpdated(Date dateUpdated) {
        this.dateUpdated = dateUpdated;
    }

    public Date getDateCreated() {
        return dateCreated;
    }

    public void setDateCreated(Date dateCreated) {
        this.dateCreated = dateCreated;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customer other = (Customer) that;
        return (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getComapnyCode() == null ? other.getComapnyCode() == null : this.getComapnyCode().equals(other.getComapnyCode()))
            && (this.getComapnyId() == null ? other.getComapnyId() == null : this.getComapnyId().equals(other.getComapnyId()))
            && (this.getDateUpdated() == null ? other.getDateUpdated() == null : this.getDateUpdated().equals(other.getDateUpdated()))
            && (this.getDateCreated() == null ? other.getDateCreated() == null : this.getDateCreated().equals(other.getDateCreated()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getComapnyCode() == null) ? 0 : getComapnyCode().hashCode());
        result = prime * result + ((getComapnyId() == null) ? 0 : getComapnyId().hashCode());
        result = prime * result + ((getDateUpdated() == null) ? 0 : getDateUpdated().hashCode());
        result = prime * result + ((getDateCreated() == null) ? 0 : getDateCreated().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        return result;
    }
}